package com.ihisun.tmhcms.core.dao.mechanismdao;

import com.ihisun.tmhcms.core.vo.MechanismTypeVo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface MechanismTypeDao extends JpaRepository<MechanismTypeVo,Long> {

    @Query(value = "select * from m_mechanism_type where state!=3",nativeQuery = true)
    public Page<MechanismTypeVo>findByLimit(Pageable pageable);
    @Query(value = "select * from m_mechanism_type where classification_name=:name and state!=3",nativeQuery = true)
    public Page<MechanismTypeVo>findByClassificationName(Pageable pageable,@Param("name") String name);
}
